const Router = require('@koa/router')
const router = new Router({
  prefix: '/api/v1/user'
})
const userController = require('../controllers/userController')

// 用户相关路由
router.post('/register', userController.register)
router.post('/login', userController.login)
router.post('/update', userController.update)
router.get('/delete', userController.delete)
router.get('/findOne', userController.findOne)
router.get('/findAll', userController.findAll)
router.get('/name/exist', userController.isUsernameExist)
router.post('/reset/password', userController.resetPassword)

module.exports = router